//1.引入EventEmitter 依赖包
const EventEmitter = require('events');
//2.创建时间触发器对象
const eventEmitter = new EventEmitter();
//3.给事件触发器添加回调函数
eventEmitter.on('start',rate =>{
    console.log('开始'+rate);
});
eventEmitter.on('end',rate =>{
    console.log('结束'+rate);
})
//4.触发时间
eventEmitter.emit('start','%0');
eventEmitter.emit('end','%100');
